#pragma once

#include <glm/glm.hpp>
#include "engine/platform/shader.h"
#include <GL/glew.h>
#include <memory>
#include "engine/platform/mesh_loader.h"
#include "engine/core/camera3d.h"

namespace kanon
{
    struct MeshVertex
    {
        glm::vec3 pos;
        glm::vec3 normal;
        glm::vec2 uv;
    };

    class MeshRenderer
    {
    private:
        std::shared_ptr<Shader> shader;
        std::shared_ptr<Camera3d> camera;
    public:
        MeshRenderer();

        void Begin();
        void End();
        void SetCamera(const std::shared_ptr<Camera3d>& cam);
        void Render(const std::shared_ptr<Mesh>& mesh);
        void Render(const std::shared_ptr<Model>& model);
    };
}
